
import java.io.Closeable;
import java.io.IOException;

public class Util {
    public static void close(Closeable ... cs){
        for(Closeable c : cs){
            try{
                c.close();
            }catch(IOException e){
                e.printStackTrace();
            }
        }
    }
	public static String toUTF8(String s){
		try{
			return new String( s.getBytes("utf-8") , "utf-8");
		}catch(Exception e){e.printStackTrace();return "";}
		
	}

	public static String toGBK(String s){
		try{
			return new String( s.getBytes("GBK") , "GBK");
		}catch(Exception e){e.printStackTrace(); return "";}
	}

}
